<?php
namespace app\common\model;
/**
* Deal模型
*/
class Deal extends BaseModel
{
	public function getDeals($data = [],$limit = 0){
		// $data['status'] = 1;
		$order = ['id' => 'desc'];
		if($limit){
			$result = $this->where($data)
			->order($order)
			->limit($limit)
			->select();
		}else{
			$result = $this->where($data)
			->order($order)
			->select();
		}
		// var_dump($this->getLastSql());
		return $result;
	}
}